package com.jefe.bamboo.service.service;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.util.ClassLoaderProxy;


/**
 * <a href="UserPrefsLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class provides static methods for the
 * <code>com.jefe.bamboo.service.service.UserPrefsLocalService</code>
 * bean. The static methods of this class calls the same methods of the bean
 * instance. It's convenient to be able to just write one line to call a method
 * on a bean instead of writing a lookup call and a method call.
 * </p>
 *
 * @author Brian Wing Shun Chan
 *
 * @see com.jefe.bamboo.service.service.UserPrefsLocalService
 *
 */
public class UserPrefsLocalServiceUtil {
    private static UserPrefsLocalService _service;

    public static com.jefe.bamboo.service.model.UserPrefs addUserPrefs(
        com.jefe.bamboo.service.model.UserPrefs userPrefs)
        throws com.liferay.portal.SystemException {
        return getService().addUserPrefs(userPrefs);
    }

    public static com.jefe.bamboo.service.model.UserPrefs createUserPrefs(
        long id) {
        return getService().createUserPrefs(id);
    }

    public static void deleteUserPrefs(long id)
        throws com.liferay.portal.PortalException,
            com.liferay.portal.SystemException {
        getService().deleteUserPrefs(id);
    }

    public static void deleteUserPrefs(
        com.jefe.bamboo.service.model.UserPrefs userPrefs)
        throws com.liferay.portal.SystemException {
        getService().deleteUserPrefs(userPrefs);
    }

    public static java.util.List<Object> dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
        throws com.liferay.portal.SystemException {
        return getService().dynamicQuery(dynamicQuery);
    }

    public static java.util.List<Object> dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
        int end) throws com.liferay.portal.SystemException {
        return getService().dynamicQuery(dynamicQuery, start, end);
    }

    public static com.jefe.bamboo.service.model.UserPrefs getUserPrefs(long id)
        throws com.liferay.portal.PortalException,
            com.liferay.portal.SystemException {
        return getService().getUserPrefs(id);
    }

    public static java.util.List<com.jefe.bamboo.service.model.UserPrefs> getUserPrefses(
        int start, int end) throws com.liferay.portal.SystemException {
        return getService().getUserPrefses(start, end);
    }

    public static int getUserPrefsesCount()
        throws com.liferay.portal.SystemException {
        return getService().getUserPrefsesCount();
    }

    public static com.jefe.bamboo.service.model.UserPrefs updateUserPrefs(
        com.jefe.bamboo.service.model.UserPrefs userPrefs)
        throws com.liferay.portal.SystemException {
        return getService().updateUserPrefs(userPrefs);
    }

    public static com.jefe.bamboo.service.model.UserPrefs updateUserPrefs(
        com.jefe.bamboo.service.model.UserPrefs userPrefs, boolean merge)
        throws com.liferay.portal.SystemException {
        return getService().updateUserPrefs(userPrefs, merge);
    }

    public static void clearService() {
        _service = null;
    }

    public static UserPrefsLocalService getService() {
        if (_service == null) {
            Object obj = PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
                    UserPrefsLocalServiceUtil.class.getName());
            ClassLoader portletClassLoader = (ClassLoader) PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
                    "portletClassLoader");

            ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(obj,
                    portletClassLoader);

            _service = new UserPrefsLocalServiceClp(classLoaderProxy);

            ClpSerializer.setClassLoader(portletClassLoader);
        }

        return _service;
    }

    public void setService(UserPrefsLocalService service) {
        _service = service;
    }
}
